package com.pkuse.bjousystem.entity.school;

import com.pkuse.bjousystem.AuthEntity;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "xxdmb")
public class School implements AuthEntity {
    //学校代码
    @Id
    private String xxdm;
    //机构名称
    private String xxmc;

    public String getName() {
        return xxmc;
    }

    public String getId() {
        return xxdm;
    }

    @Override
    public String toString() {
        return "学校代码:" + xxdm + ";机构名称:" + xxmc;
    }

    @Override
    public String getAuthUsername() {
        return getId();
    }

    @Override
    public String getAuthPassword() {
        return getName();
    }

    @Override
    public AuthType getAuthType() {
        return AuthType.School;
    }
}
